<template>
    <div>
        <div class="body">
            <div class="header">
                <div class="hz">
                    <div></div>
                </div>
                <div class="hy">
                    <router-link v-for="item in menuData" :key="item.id" :to="item.path">
                        <img :src="item.pic" alt="" />
                        <div>{{item.name}}</div>
                    </router-link>
                </div>
            </div>
            <div class="main">
                <router-view />
            </div>
            <div class="footer">
                <div class="xx">
                    <img src="../../assets/laba.png" alt="" />
                    <div>三笔订单等待付款</div>
                </div>
                <div class="indexbtn">立即查看</div>
            </div>
        </div>
    </div>
</template>

<script>
import { createNamespacedHelpers } from "vuex";
const { mapActions, mapState, mapMutations } = createNamespacedHelpers("menu");
export default {

    computed:{
     ...mapState(["menuData"]),
    },
mounted() {
    this.getAllmenu();
  },
methods:{
    ...mapActions(["getAllmenu"]),

}


};
</script>
<style>
* {
    padding: 0px;
    margin: 0px;
}

.header {
    height: 102px;
    color: #333;
    text-align: center;
    width: 100%;
    display: flex;
    background-image: linear-gradient(90deg, #0af, #0085ff);
    color: #fff;
}

.footer {
    height: 43px;
    border-top: 1px solid #eeeeee;
    color: #333;
    text-align: center;
    width: 100%;
}

.hz {
    width: 128px;
    height: 100%;
}

.hz > div {
    width: 92px;
    height: 102px;
    background: url("../../assets/zuyu.jpg") center;
    background-size: 100%;
}

.hy {
    width: 850px;
    height: 102px;
    display: flex;
    justify-content: space-between;
}

.hy > a {
    width: 97px;
    height: 102px;
    margin: 0 auto;
    text-decoration: none;
    color:white;
}

.hy > a> img {
    width: 42px;
    height: 42px;
    margin-top: 20px;
}

.main {
    height: 624px;

    color: #333;
    text-align: center;
}

.body {
    width: 1024px;
    height: 768px;
    margin: 0 auto;
    border: 1px solid #eeeeee;
}

.xx {
    width: 300px;
    margin: 0 auto;
    margin-right: 700px;
    display: flex;
}

.xx > img {
    width: 30px;
    height: 30px;
    margin-top: 5px;
}

.xx > div {
    width: 170px;
    padding-left: 20px;
    line-height: 40px;
}

.indexbtn {
    width: 90px;
    height: 25px;
    color: #aac9ff;
    border: 1px solid #aac9ff;
    margin: 0 auto;
    margin-top: -32px;
    margin-left: 900px;
    border-radius: 10px;
    text-align: center;
    line-height: 25px;
}

</style>